from django.db import models

# Create your models here.


class Student(models.Model):
    """
    学生
    """
    SHIRT_SIZES = (
        ('1', '男'),
        ('2', '女'),
    )

    id = models.AutoField(primary_key=True)  # 学生ID
    name = models.CharField(max_length=30, verbose_name="姓名", help_text="姓名")  # 学生名字
    sexy = models.CharField(max_length=10, choices=SHIRT_SIZES, verbose_name="性别", help_text="性别")  # 学生性别

    class Meta:
        verbose_name = "学生"
        verbose_name_plural = verbose_name


class StudentScore(models.Model):
    """
    学生成绩
    """
    score = models.FloatField()
    category = models.ForeignKey(Student, verbose_name="成绩", on_delete=models.DO_NOTHING)